package com.ruoyi.project.constant.statuEnum;
public enum Sex {

    MAN(0,"男"),
    WOMEN(1,"女"),
    UNKNOW(2,"未知");

    private final Integer code;
    private final String info;
    Sex(Integer code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public Integer getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static String getValue(String code) {
        for (Sex ele : values()) {
            if(ele.getCode().equals(code)) return ele.getInfo();
        }
        return null;
    }
}
